package utils;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 *
 * utils
 *
 * 2018/5/15-7:43
 * 2018
 * Created by wuqiang on 2018/5/15.
 */
public class TimeUtil {

    static final DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd");

    static final DateFormat dateTimeFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    public static String parseDate2String(Date date){
        return dateFormat.format(date);
    }

    public static String parseDateTime2String(Date date){
        return dateTimeFormat.format(date);
    }
}
